package com.metamedia.test;

public class Max extends Operation {
	double[] numbers;

	public Max(double... numbers) {
		this.numbers = numbers;
	}

	@Override
	public Double compute() {
		double max = numbers[0];
		for (double number : numbers)
			if (number > max)
				max = number;
		return max;
	}

	@Override
	public String getName() {
		return "MAX";
	}
}